<?php

class Projetos extends P4A_Base_Mask{
	
	public $toolbar;
	
	public function __construct(){
		parent::__construct();
		
		$this->build('p4a_db_source','source')
			->setTable('projeto')
			->load()
			;
		$this->setSource($this->source);
		
		$this->build('p4a_table','table')
			->setSource($this->source);
		
		$this->build('p4a_simple_toolbar','toolbar')
			->setMask($this);
		
		while($field = $this->fields->nextItem()){
			$this->frame->anchor($field);
		}
		$this->frame->anchor($this->table);
		
		$this->_display();
	}
	
	private function _display(){
		$this->display('menu',P4A::singleton()->menu);
		$this->display('top',$this->toolbar);
	}
}